package com.wb.system.mapper;

import com.wb.common.vo.CustomerModelVO;
import com.wb.common.vo.SalesmanRankingVO;
import com.wb.common.vo.ShareStatisticBarGraphVO;
import com.wb.system.domain.Customer;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

/**
 * 慧尔股份
 *
 * @Description TODO
 * @Author zhangxl
 * @Date 2025/7/19 15:02
 */
public interface CustomerMapper {
    List<Customer> customerList(CustomerModelVO customerModelVO);

    int saveCustomer(Customer customer);

    int updateCustomer(Customer customer);

    Customer getCustomer(Long customerId);

    long todayNewAdditions();

    List<SalesmanRankingVO> salesmanRanking();

    List<ShareStatisticBarGraphVO> shareStatistic(@Param("startDate") String startDate, @Param("endDate") String endDate);

    List<ShareStatisticBarGraphVO> customerConversion(@Param("startDate") String startDate, @Param("endDate") String endDate);

    int selectCountByShareUserId(Long userId);

    int selectContactedCountByShareUserId(Long userId);

    /**
     *
     * @param userId 用户ID
     * @param month 2025-07
     * @param days 当月总天数
     * @return
     */
    int selectMonthlyCountByShareUserId(@Param("userId") Long userId, @Param("month") String month,@Param("days") String days);
}
